import request from '@/utils/request'
export function getOnlineUsers() {
  return request({
    url: '/message/getOnlineUsers',
    method: 'get'
  })
}
export function sendBroadcastMessage(data) {
  return request({
    url: '/message/sendBroadcastMessage',
    method: 'post',
    data: data
  })
}

export function sendPrivateMessage(data) {
  return request({
    url: '/message/sendPrivateMessage',
    method: 'post',
    data: data
  })
}
// 查询用户通知列表
export function listNotification(query) {
  return request({
    url: '/system/user/list',
    method: 'get',
    params: query
  })
}

// 查询用户通知详细
export function getNotification(userId) {
  return request({
    url: '/system/user/' + userId,
    method: 'get'
  })
}

// 新增用户通知
export function addNotification(data) {
  return request({
    url: '/system/user/',
    method: 'post',
    data: data
  })
}

// 修改用户通知
export function updateNotification(data) {
  return request({
    url: '/system/user/',
    method: 'put',
    data: data
  })
}

// 删除用户通知
export function delNotification(userId) {
  return request({
    url: '/system/user/' + userId,
    method: 'delete'
  })
}
